home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 23
/
AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso
/
Tools
/
Text-Viewer
/
Notes
/
english
/
Basskey.file
< prev
next >
Wrap
Text File
|
1999-11-06
|
38KB
|
1,261 lines
/* subprogramm for Notes.pprx */
signal on halt
signal on break_c
signal on break_e
signal on break_d
call ppm_SetStyle(N)
call ppm_SetMagMode(180)
call ppm_UpdateScreen()
noteneingabe:
/* smallest notedistance */
sysart = "notesystem:2"
systemart = ppm_Getform("Please repeat your choice of the notesystems... (2, 1v oder 1b)", 3, sysart)
select
when systemart == '2' then zdist = 4
when systemart == '1v' then zdist = 2
when systemart == '1b' then zdist = 2
otherwise noteneingabe()
end
zdist2 = zdist-2
xgrdform = "(1,2,4,8 oder 16)"
xgrd = ppm_GetForm("Pleace give in the smallest note distance ...(nothing=Break!)", 3, xgrdform)
if xgrd == '' then exit_msg("Break")
select
when xgrd == '1' then xg =0.7
when xgrd == '2' then xg =1.4
when xgrd == '4' then xg =2.8
when xgrd == '8' then xg =5.6
when xgrd == '16' then xg =11.2
otherwise noteneingabe()
end
/* pointmessure of the notes */
notepkt = 26
call ppm_SetJustification(0)
zz = 0 /* linecounter (german=Zeilenzähler) */
notex = 2.5
page = ppm_CurrentPage()
pfad:
do
choose=ppm_Inform(2,"Please choose the notefile or break ...", "Break","File")
if choose == 0 then exit_msg("Break!")
eingabe = ppm_GetFileName("Pleace choose the notescriptfile ...", "Notes:")
res = OPEN(notenfile, eingabe, 'R')
if res == 0 then
do
call ppm_inform(1,"There was an error, or the file doesn't exists!!!","OK")
pfad()
end
call ppm_ShowStatus("OK, I'm working ...")
auslesen(notenfile)
end
/* x-distance of the notes */
auslesen:
do
parse arg file
noten = READCH(file, 4000)
i=1
do forever
nw = word(noten, i)
nn = word(noten, i+1)
al = word(noten, i+2)
if nw == 'P' then nw = 'p'
if nw == 'D' then nw = 'd'
if nw == 'C' then nw = 'c'
if nw == 'L' then nw = 'l'
if nn == 'L' then nn = 'l'
if nw == 'J' then nw = 'j'
if nw == 'END' then nw = 'end'
select
when al == (X2C(4e0a)) then al = 'n'
when al == (X2C(6e0a)) then al = 'n'
when al == (X2C(300a)) then al = '0'
otherwise exit_msg("There was an error!")
end
select
when nn=='DB1' then nn = 'Db1'
when nn=='GB1' then nn = 'Gb1'
when nn=='BB1' then nn = 'Bb1'
when nn=='AB1' then nn = 'Ab1'
when nn=='DB2' then nn = 'Db2'
when nn=='EB2' then nn = 'Eb2'
when nn=='BB2' then nn = 'Bb2'
when nn=='GB2' then nn = 'Gb2'
when nn=='AB2' then nn = 'Ab2'
when nn=='DB3' then nn = 'Db3'
when nn=='EB3' then nn = 'Eb3'
when nn=='BB3' then nn = 'Bb3'
when nn=='GB3' then nn = 'Gb3'
when nn=='AB3' then nn = 'Ab3'
otherwise NOP
end
call auswahl()
i=i+3
end
end
auswahl:
do
select
when nw == 'j' then do
zz = 0 /* linecounter */
notex = 2.5
return
end
when nw == 'end' then
do
call ppm_ClearStatus()
exit_msg("Ready!")
end
when nw == 's' then
do
xw = xg/16
nw='x'
yv = 0
end
when nw == 'S' then
do
xw = xg/16
nw='X'
yv = 0.47
end
when nw == 'e' then
do
xw = xg/8
nw='e'
yv = 0
end
when nw == 'E' then
do
xw = xg/8
nw='E'
yv = 0.47
end
when nw == 'q' then
do
xw = xg/4
nw='q'
yv = 0
end
when nw == 'Q' then
do
xw = xg/4
nw='Q'
yv = 0.47
end
when nw == 'h' then
do
xw = xg/2
yv = 0
end
when nw == 'H' then
do
xw = xg/2
yv = 0.47
end
when nw == 'w' then
do
xw = xg
nw='w'
yv = 0
end
when nw == 'W' then
do
xw = xg
nw='W'
yv = 0.47
end
when nw == 'pt' then
do
if notex < 3 then
do
notex = bakx
zz = zz - zdist
call ppm_SetSize(25)
box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
call ppm_SetSize(20)
call ppm_TextIntoBox(box#id, 'd')
end
else
do
call ppm_SetSize(25)
box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
call ppm_SetSize(20)
call ppm_TextIntoBox(box#id, 'd')
end
select
when nn == '1' then
do
xw = xg
notex = notex+xw
end
when nn == '2' then
do
xw = xg/2
notex = notex+xw
end
when nn == '4' then
do
xw = xg/4
notex = notex+xw
end
when nn == '8' then
do
xw = xg/8
notex = notex+xw
end
when nn == '16' then
do
xw = xg/16
notex = notex+xw
end
when nn == 'l' then
do
xw = 0.2
notex = notex+xw
end
otherwise
do
call ppm_ClearStatus()
exit_msg("There was an error")
end
end
if notex >=18.7 then
do
notex = 2.5
zz = zz + zdist
end
return
end
when nw == 'PT' then
do
if notex < 3 then
do
notex = bakx
zz = zz - zdist
call ppm_SetSize(25)
box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
call ppm_SetSize(20)
call ppm_TextIntoBox(box#id, 'd')
end
else
do
call ppm_SetSize(25)
box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
call ppm_SetSize(20)
call ppm_TextIntoBox(box#id, 'd')
end
select
when nn == '1' then
do
xw = xg
notex = notex+xw
end
when nn == '2' then
do
xw = xg/2
notex = notex+xw
end
when nn == '4' then
do
xw = xg/4
notex = notex+xw
end
when nn == '8' then
do
xw = xg/8
notex = notex+xw
end
when nn == '16' then
do
xw = xg/16
notex = notex+xw
end
when nn == 'l' then
do
xw = 0.2
notex = notex+xw
end
otherwise
do
call ppm_ClearStatus()
exit_msg("There was an error")
end
end
if notex >=18.7 then
do
notex = 2.5
zz = zz + zdist
end
return
end
/* barline */
when nw =